package com.sdry.service.jyy;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sdry.mapper.jyy.CutMapper;
import com.sdry.model.hpf.Product;
import com.sdry.model.jyy.Cut;
import com.sdry.model.jyy.CutExample;
import com.sdry.model.zc.ZcTrolleyBindingEntity;

/**
 * @ClassName:    [CutServiseImpl]   
 * @Description:  切割  工位  业务层实现类]   
 * @Author:       [jyy]   
 * @CreateDate:   [2018年10月12日 上午11:54:33]    
 * @Version:      [v1.0]
 */
@Service
@Transactional
public class CutServiseImpl implements CutServise{

	@Resource
	private CutMapper cutMapper;

	@Override
	public int countByExample(CutExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByExample(CutExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int insert(Cut record) {
		return cutMapper.insert(record);
	}

	@Override
	public int insertSelective(Cut record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Cut> selectByExampleWithBLOBs(CutExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Cut> selectByExample(CutExample example) {
		return cutMapper.selectByExample(example);
	}

	@Override
	public List<Cut> selectByExampleWithBLOBsForStartPage(CutExample example,
			Integer pageNum, Integer pageSize) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Cut> selectByExampleForStartPage(CutExample example,
			Integer pageNum, Integer pageSize) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Cut> selectByExampleWithBLOBsForOffsetPage(CutExample example,
			Integer offset, Integer limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Cut> selectByExampleForOffsetPage(CutExample example,
			Integer offset, Integer limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Cut selectFirstByExample(CutExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Cut selectFirstByExampleWithBLOBs(CutExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Cut selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Cut selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int updateByExampleSelective(Cut record, CutExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByExampleWithBLOBs(Cut record, CutExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByExample(Cut record, CutExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKeySelective(Cut record) {
		return cutMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKeyWithBLOBs(Cut record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKey(Cut record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByPrimaryKeys(String ids) {
		
		int affact = 0;
		
		String[] split = ids.split(",");
		for (String s : split) {
			Long id = Long.valueOf(s);
			affact = cutMapper.deleteByPrimaryKey(id);
		}
		return affact;
	}

	@Override
	public int deleteByPrimaryKeys2(String ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void initMapper() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Product selsectPro(String pnum) {
		return cutMapper.selsectPro(pnum);
	}

	@Override
	public int selectActualNum(Cut cut) {
		return cutMapper.selectActualNum(cut);
	}

	@Override
	public void editcremark6(String code) {
		cutMapper.editcremark6(code);
	}

	@Override
	public int selecTrolley(String trolleyNumber) {
		return cutMapper.selecTrolley(trolleyNumber);
	}

	@Override
	public int updatEnd(Long id) {
		return cutMapper.updatEnd(id);
	}

	@Override
	public int selectYearNum(Cut cut) {
		return cutMapper.selectYearNum(cut);
	}

	@Override
	public ZcTrolleyBindingEntity selectBudingByCode(String ctube) {
		return cutMapper.selectBudingByCode(ctube);
	}

	@Override
	public int countFgByCode(String ctube) {
		return cutMapper.countFgByCode(ctube);
	}

}
